home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue39 / userint / mainform.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1998-08-06  |  3.5 KB  |  147 lines

  1. unit mainform;
  2.  
  3. interface
  4.  
  5. uses
  6.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  7.   StdActns, ActnList, ImgList, Menus, ComCtrls, ToolWin, ExtCtrls, Buttons,
  8.   StdCtrls;
  9.  
  10. type
  11.   TIDEForm = class(TForm)
  12.     ImageList1: TImageList;
  13.     ActionList1: TActionList;
  14.     FileNew1: TAction;
  15.     FileOpen1: TAction;
  16.     FileClose1: TWindowClose;
  17.     FileSave1: TAction;
  18.     FileSaveAs1: TAction;
  19.     FileExit1: TAction;
  20.     EditCut1: TEditCut;
  21.     EditCopy1: TEditCopy;
  22.     EditPaste1: TEditPaste;
  23.     WindowCascade1: TWindowCascade;
  24.     WindowTileHorizontal1: TWindowTileHorizontal;
  25.     WindowTileVertical1: TWindowTileVertical;
  26.     WindowMinimizeAll1: TWindowMinimizeAll;
  27.     WindowArrangeAll1: TWindowArrange;
  28.     HelpAbout1: TAction;
  29.     OpenDialog: TOpenDialog;
  30.     RecentMenu: TPopupMenu;
  31.     cFIlea1: TMenuItem;
  32.     cFile21: TMenuItem;
  33.     ControlBar1: TControlBar;
  34.     ToolBar1: TToolBar;
  35.     ToolButton7: TToolButton;
  36.     ToolButton8: TToolButton;
  37.     ToolButton10: TToolButton;
  38.     ToolButton11: TToolButton;
  39.     ToolButton12: TToolButton;
  40.     ToolButton13: TToolButton;
  41.     ToolButton14: TToolButton;
  42.     ToolButton15: TToolButton;
  43.     ToolButton16: TToolButton;
  44.     ToolButton18: TToolButton;
  45.     MainMenu1: TMainMenu;
  46.     File1: TMenuItem;
  47.     New1: TMenuItem;
  48.     Open1: TMenuItem;
  49.     Close1: TMenuItem;
  50.     Save1: TMenuItem;
  51.     SaveAs1: TMenuItem;
  52.     N1: TMenuItem;
  53.     Exit1: TMenuItem;
  54.     Edit1: TMenuItem;
  55.     Cut1: TMenuItem;
  56.     Copy1: TMenuItem;
  57.     Paste1: TMenuItem;
  58.     Search1: TMenuItem;
  59.     View1: TMenuItem;
  60.     Project1: TMenuItem;
  61.     Run1: TMenuItem;
  62.     Component1: TMenuItem;
  63.     Database1: TMenuItem;
  64.     Tools1: TMenuItem;
  65.     Help1: TMenuItem;
  66.     WindowA1: TMenuItem;
  67.     WindowB1: TMenuItem;
  68.     WindowC1: TMenuItem;
  69.     ToolBar2: TToolBar;
  70.     ToolBar3: TToolBar;
  71.     ToolButton1: TToolButton;
  72.     ToolButton2: TToolButton;
  73.     ToolButton3: TToolButton;
  74.     ToolButton4: TToolButton;
  75.     ToolButton5: TToolButton;
  76.     ToolButton6: TToolButton;
  77.     Find1: TMenuItem;
  78.     Add1: TMenuItem;
  79.     Run2: TMenuItem;
  80.     Install1: TMenuItem;
  81.     Explore1: TMenuItem;
  82.     Environmentoptions1: TMenuItem;
  83.     Index1: TMenuItem;
  84.     procedure FormShow(Sender: TObject);
  85.     procedure ControlBar1Resize(Sender: TObject);
  86.     procedure DoNothing(Sender: TObject);
  87.     procedure FileOpen1Execute(Sender: TObject);
  88.     procedure WindowC1Click(Sender: TObject);
  89.   private
  90.     { Private declarations }
  91.   public
  92.     { Public declarations }
  93.   end;
  94.  
  95. var
  96.   IDEForm: TIDEForm;
  97.  
  98. implementation
  99.  
  100. uses ObjInsp, ProjMan, Editor;
  101.  
  102. {$R *.DFM}
  103.  
  104. procedure TIDEForm.FormShow(Sender: TObject);
  105. begin
  106.   Left := 0;
  107.   Top := 0;
  108.   Width := Screen.Width;
  109.   Height := ControlBar1.Height + (Height - ClientHeight);
  110.   Constraints.MaxHeight := Height;
  111.   with ObjInspector do begin
  112.     Left := 1;
  113.     Top := Self.Top + Self.Height;
  114.     Show;
  115.   end;
  116.   ProjManager.Show;
  117.   EditWin.Show;
  118. end;
  119.  
  120. procedure TIDEForm.ControlBar1Resize(Sender: TObject);
  121. begin
  122.   Constraints.MaxHeight := 0;
  123.   Height := ControlBar1.Height + (Height - ClientHeight);
  124.   Constraints.MaxHeight := Height;
  125. end;
  126.  
  127. procedure TIDEForm.DoNothing(Sender: TObject);
  128. begin
  129.  ;
  130. end;
  131.  
  132. procedure TIDEForm.FileOpen1Execute(Sender: TObject);
  133. begin
  134.   OpenDialog.Execute;
  135. end;
  136.  
  137. procedure TIDEForm.WindowC1Click(Sender: TObject);
  138. begin
  139.   with (Sender as TMenuItem) do
  140.     if checked then
  141.       Checked := false
  142.     else
  143.       Checked := true;
  144. end;
  145.  
  146. end.
  147.